<?php
/**
 * 测试无所谓  
 *
 * @filesource testPHP.php
 * @package MagicDB
 * @subpackage test
 * @version $id: 0.1, utf8, Tue Dec 22 20:35:29 CST 2009
 * @author LD King <kldscs[at]gmail.com>
 * @copyright Copyleft (D.) 2007 - 2009 MiFunny China Inc.
 * @link http://mifunny.info/
 * @example 
 *   
 */


echo __FILE__, '是吗?';

require_once '../MagicDB.class.php';
require_once '../mmysqli.class.php';
require_once '../mmysql.class.php';
$policy = array(
    'host' => 'localhost',
    'username' => 'mifunny',
    'password' => 'mifunny',
    'dbname' => 'mifunny',
    'host' => NULL,
    'unix_socket' => NULL,
    'persistent' => true,
);

/*
//mysqli 测试
$db = new mmysqli($policy); 
$re = $db->query( "SELECT ID, post_title FROM `wp_posts` LIMIT 0 , 3" );
if( $re ){
    var_dump( $re->fetchAll() );
    $re->nextRowset();
}

$re2 = $db->query( "SELECT ID, post_title FROM `wp_posts` LIMIT 6 , 2" );
var_dump( $re2->fetch() );
echo '<hr/><br/>';
var_dump( $re2->fetch() );
 */

//mysql 测试
$db = new mmysql($policy); 
$re = $db->query( "SELECT ID, post_title FROM `wp_posts` LIMIT 0 , 3" );
if( $re ){
    var_dump( $re->fetchAll() );
    $re->nextRowset();
}

$re2 = $db->query( "SELECT ID, post_title FROM `wp_posts` LIMIT 6 , 2" );
var_dump( $re2->fetch() );
echo '<hr/><br/>';
var_dump( $re2->fetch() );



?>

